package org.jarraiders.musiclibrary.client;

import org.jarraiders.musiclibrary.client.layout.Layout;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.ui.RootPanel;

public class Library implements EntryPoint {

	public void onModuleLoad() {
		
		ArtistsServiceAsync artistsRpcService = GWT.create(ArtistsService.class);
		AlbumsServiceAsync albumsRpcService = GWT.create(AlbumsService.class);
		TracksServiceAsync tracksRpcService = GWT.create(TracksService.class);
		HandlerManager eventBus = new HandlerManager(null);
		Layout mainLayout= new Layout();
		AppController appViewer = new AppController( artistsRpcService, albumsRpcService, tracksRpcService,
				eventBus, mainLayout);
		

		RootPanel.get().add(mainLayout);
		appViewer.go(mainLayout.getContainer());

	}
}
